<script type="text/javascript">
$(document).ready(function(){
	$('.date-pick').datePicker({startDate:'1996.01.01'});

        $("#first").children("ul").children("li").each(function(){
             $(this).click(function(){
                var num = $(this).attr("lang");
                $("#first").children("ul").children("li").removeClass('cur');
                $(this).addClass('cur');
                $(".charts").hide();
                if(num==0){
                	$("#category_chart").show();
                	$("#search").show();
                }else if(num==1){
                	$("#search").hide();
                    $("#model_chart").show();
                }else{
                	$("#search").hide();
                	$("#code_chart").show();
                }
             })
            
        })
     $("#sub").click(function(){
             var first_time = $("#first_time").val();
             var second_time = $("#second_time").val();
             var ord = $("#ord").val();
             if(first_time==''){
                 alert('起始日期不能空');
                 return false;
             }
             if(second_time==''){
                 alert('截止日期不能空');
                 return false;
             }
             if(ord=='0'){
                 alert('请选择排列方式');
                 return false;
             }
         })
})
</script>
<style>
  .sum{clear:both;}
  .sum li{list-style:none;float:left;width:150px;line-height:35px;height:35px;cursor:pointer;margin-bottom:5px;font-size:14px;}
  .sum2{clear:both;}
  .sum2 li{list-style:none;float:left;width:150px;line-height:15px;height:15px;cursor:pointer;margin-bottom:15px;font-size:12px;}

  .cur{color:red;font-weight:600;font-size:16px;}
dt{
    color: #333333;
    float: left;
    margin: 0;
    padding: 4px 0 0;
    text-align: right;
	width:80px;
	font-weight:600;
	font-size:14px;
}
dd{
	 margin-left: 10px;
      padding: 4px 0 4px 5px;
	line-height:25px;
	overflow:hidden;
}	
dl{clear:both;line-height:25px;}
</style>
 
<div id="center-column">
  <div class="sum"><ul><li  lang="0"><a  class="cur" href="<?php echo  base_url();?>chart/index" >数据总量统计</a></li><li lang="1" ><a href="<?php echo  base_url();?>chart/send_total" >资料发放统计</a></li><li lang="2" ><a href="<?php echo  base_url();?>chart/update_total" >资料更新统计</a></li><li lang="3"><a href="<?php echo  base_url();?>chart/inventory_total" >库存统计</a></li></ul></div>
  <!-- <div class="sum2" id="first"><ul><li  class="cur" lang="0">按时间段</li><li lang="1"  class="cur" >按型代号</li></ul></div>  --> 
		   <!--<?php echo form_open('chart/index',array('id'=>'index_form'));?> 
		    <dl id="search">
		        <dt>起始日期：</dt>
		        <dd><input name='first_time' id='first_time' class='date-pick' value="<?php echo $firsttime;?>" ><span style="float:left;">
		            &nbsp;&nbsp;截止日期：</span><input name='second_time' id='second_time' class='date-pick' value="<?php echo $secondtime;?>"  >
		            <span style="float:left;margin-left:100px;">
		            &nbsp;&nbsp;排列方式：</span>
		            <select name="ord" id="ord">
		                 <option value="0">选择方式</option>
		                 <option value="1">年</option>
		                 <option value="2">月</option>
		                 <option value="3">周</option>
		            </select>
		            &nbsp;&nbsp;<input type="submit" value="提交" id="sub"/></dd>
		    </dl>    
		   </form>  -->
        <div style="height:228px; min-width:228px; margin-bottom:10px;display:none;" id="category_chart" class="charts">

                  <table class="listing" cellpadding="0" cellspacing="0">
                     <tr><th width="10%">标题</th><th>数量</th></tr>
                     <tr><td>种类</td><td><?php echo $times[0]; ?></td></tr>
                     <tr><td>总份数</td><td><?php echo $times[1]; ?></td></tr>
                  </table>
        </div>
        <div style="height:470px;overflow:auto; margin-top:10px;clear:both;" id="model_chart" class="charts">
             <table class="listing" cellpadding="0" cellspacing="0">
                     <tr><th width="10%">型号</th><th>种类数量</th><th>资料数量</th></tr>
                  <?php foreach($modss[0] as $k=>$v) {?>
                     <tr><td><?php echo $v;?></td><td><?php echo $modss[1][$k]; ?></td><td><?php echo $modss[2][$k]; ?></td></tr>
                  <?php }?>   
                  </table>
             
                </div>
 <!--      <div style="height:228px; margin-top:10px;display:none;clear:both;" id="code_chart" class="charts">
           <table class="listing" cellpadding="0" cellspacing="0">
                  <tr><th width="10%">型号</th><th>种类编码</th><th>资料数量</th></tr>
                  <?php foreach($codes[0] as $k=>$v) {?>
                     <tr><td><?php echo $v;?></td><td><?php echo $codes[1][$k]; ?></td><td><?php echo $codes[2][$k]; ?></td></tr>
                  <?php }?>   
                  </table>
             
          </div>       -->  
		</div>
	</div>
	<div id="footer"></div>
</div>



</body>
</html>
